<?php TPL::output('global/header_landing.tpl.htm'); ?>

<script type="text/javascript">
	$(document).ready(function () {
		$('#header_action').append('注册新用户');
	});
</script>

<form action="account/ajax/register_process/" method="post" id="register_form">
<?php if ($this->icode) { ?><input type="hidden" name="icode" id="icode" value="<?php echo $this->icode; ?>"/><?php } ?>
<?php if ($this->return_url) { ?><input type="hidden" name="return_url" value="<?php echo $this->return_url; ?>"/><?php } ?>
<?php if ($this->fromuid AND $_GET['invite_question_id']) { ?>
  	<input type="hidden" name="invite_question_id" value="<?php echo $_GET['invite_question_id']; ?>"/> 
<?php } ?>
<div class="Ef_login login_bg_02">
  <ul class="loging register" id="user_register">
    <li>
      <input type="text" class="login_txt" name="user_name" id="login_userName" title="用户名" value="<?php echo $_GET['user_name'];?>" tabindex="1"/>
      <span class="hide"></span> </li>
    <li>
      <?php if ($_GET['email']) { ?><input type="hidden" id="userEmail" /><?php } ?>
      <input type="text" class="login_txt" id="login_account" title="账号（邮箱）" name="email" value="<?php echo $_GET['email']; ?>" tabindex="2" />
      <span class="hide"></span> </li>
    <li>
      <input type="text" class="login_txt" id="login_password_txt" tabindex="3" title="密码" value="密码"/>
      <input type="password" name="password" title="密码" id="login_password" class="login_txt i_hide">
      <span class="hide"></span> </li>
    <li<?php if ($this->fromuid || $this->icode || (get_setting('register_seccode') == 'N')) { ?> style="display:none;"<?php } ?>>
      <input type="text" class="login_txt auth_code" id="authCode" name="seccode_verify" title="验证码" value="验证码" tabindex="4" />
      <em class="auth_img"><img src="" onclick="this.src = G_BASE_URL + '/account/captcha/rnd-' + Math.floor(Math.random() * 10000);" id="seccode" /></em> <span class="hide"></span> </li>
    <li id="global_err" class="i_hide">
      <p class="i_global_err i_small i_err_bg"><em class="e"></em><span id="glo_Err">账号或密码错误，请重试</span></p>
    </li>
    <li class="user_treaty">
      <input type="checkbox" name="agreement_chk" value="agree" id="user_agreement" checked="true"/>
      &nbsp;&nbsp;
      <label for="user_agreement">我同意《<a href="javascript:;" onClick="$.register.s.EveClick();">用户协议</a>》中的条款</label>
      <div class="user_treaty_txt reg_treaty_bg i_prl i_hide" id="user_agre"><span class="reg_arrows i_pas i_small"></span><div class="txt" id="register_agreement">正在载入...</div></div>
    </li>
    <li><a href="javascript:;" class="login_sub i_cl_06 i_fb_14 i_right" title="立即注册" tabindex="5"  onClick="$.register.reg.register().callback(function () { ajax_post($('#register_form'), _login_form_processer); });">注册</a></li>
  </ul>
</div>
</form>

<script type="text/javascript" src="<?php echo G_STATIC_URL; ?>/js/app/login.js"></script>
<script type="text/javascript">
	$(document).ready(function () {
		$.get(G_BASE_URL + '/account/ajax/register_agreement/', function (result) { $('#register_agreement').html(result.err); }, 'json');
		
		if (document.getElementById('seccode'))
		{
			$('#seccode').click();
		}
	});
</script>

<?php TPL::output('global/footer_blank.tpl.htm'); ?>